﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Tyshka.Subroutines.ViewModels
{
    public class DetailViewModel
    {
        public String Title { get; set; }
        public String Author { get; set; }
        public String DateAdded { get; set; }
        public Boolean IsCanVote { get; set; }
        public int Votes { get; set; }
        public String Description { get; set; }
        public String Code { get; set; }
        public String BadgeCssStyle { get; set; }

        public Boolean IsAnyStackParams { get; set; }
        public List<StackParamWrapper> StackParams { get; set; }
        public Boolean IsAnyRegisterParams { get; set; }
        public List<RegisterParamWrapper> RegisterParams { get; set; }
        public Boolean IsAnyOutput { get; set; }
        public List<RegisterParamWrapper> OutputParams { get; set; }

        public Dictionary<long, String> Tags { get; set; }

        public List<AlternativeWrapper> Alts { get; set;}
        public Boolean HasAlts { get; set; }

        public List<AlternativeWrapper> Deps { get; set; }
        public Boolean HasDeps { get; set; }


        public Boolean UploadAllowed { get; set; }
        public long Id { get; set; }
    }

    public class AlternativeWrapper
    {
        public long Id { get; set; }
        public String Name { get; set; }
        public String Author { get; set; }
        public String VotesCssClass { get; set; }
        public int Votes { get; set; }
    }

    public class RegisterParamWrapper
    {
        public String Name { get; set; }
        public String Comment { get; set; }
    }

    public class StackParamWrapper
    {
        public int Offset { get; set; }
        public String Comment { get; set; }
    }
}